﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using WindowsPhoneApp;
using System.Windows.Media.Imaging;

namespace WindowsPhoneAppHost
{
    public partial class FlowListBoxItem : UserControl
    {
        string nextXamlPageName;

        public FlowListBoxItem()
        {
            InitializeComponent();
        }

        public string Subject
        {
            get { return this.subject.Text; }
            set
            {
                this.subject.Text = value;
            }
        }
        private string pid;
        public string Pid
        {
            get { return pid; }
            set
            {
                pid = value;
            }
        }
        private string did;
        public string Did
        {
            get { return did; }
            set
            {
                did = value;
            }
        }
        private string buttonClick;
        public string ButtonClick
        {
            get { return buttonClick; }
            set
            {
                buttonClick = value;
            }
        }
        /*
        public string XamlPageName
        {
            get { return this.nextXamlPageName; }
            set
            {
                this.nextXamlPageName = value;
            }
        }
         */
        
        private void RootButton_Click(object sender, RoutedEventArgs e)
        {
            Common.executePageMethod(buttonClick, this, e);
            /*
            if (null != nextXamlPageName && nextXamlPageName.Length > 0)
            {
                Common.navigateTo("/../" + nextXamlPageName);
            }
            else
            {
                MessageBox.Show("RootButton_Click");
            }
             */                        
        }            
    }
}
